use db_iChat

CREATE TABLE [dbo].[tb_users](
	[ID] [int] NOT NULL,
	[name] [nchar](20) NOT NULL,
	[hashedPassword] [binary](16) NOT NULL,
	[question] [nchar](200) NOT NULL,
	[hashedAnswer] [binary](16) NOT NULL,
	[email] [nchar](200) NULL,
	[sighWords] [nchar](100) NULL,
	[sex] [nchar](1) NOT NULL,
	[msgGotRecordsXmlPath] [nchar](200) NOT NULL,
	[msgSentRecordsXmlPath] [nchar](200) NOT NULL,
	[friendsListXmlPath] [nchar](200) NOT NULL,
	[address] [nchar](100) NOT NULL,
	[imgHeadUrl] [nchar](200) NOT NULL,
	[imgHeadPath] [nchar](200) NOT NULL,
	[regTime] [smalldatetime] NOT NULL,
	[lastLogTime] [smalldatetime] NOT NULL,
	[logTimes] [int] NOT NULL,
	[points] [int] NOT NULL,
	[roles] [int] NOT NULL,
	[phone] [nchar](20) NOT NULL,
	[leaveTime] [smalldatetime] NULL,
	[onlineTime] [float] NULL,
	[systemInfoXmlPath] [nchar](200) NOT NULL)

GO
CREATE TABLE [dbo].[tb_articles](
	[articleID] [int] NOT NULL,
	[articleTitle] [nchar](200) NOT NULL,
	[articleUrl] [nchar](200) NOT NULL,
	[articlePath] [nchar](200) NOT NULL,
	[autherID] [nchar](20) NOT NULL,
	[createTime] [smalldatetime] NOT NULL,
	[clickTimes] [int] NOT NULL,
	[topic] [nchar](10) NOT NULL,
	[type] [nchar](10) NOT NULL,
	[up] [int] NOT NULL,
	[down] [int] NOT NULL)

GO

CREATE TABLE [dbo].[tb_remarks](
	[remarkID] [int] NOT NULL,
	[articleID] [int] NOT NULL,
	[autherID] [int] NOT NULL,
	[remarkTitle] [nchar](200) NOT NULL,
	[createTime] [smalldatetime] NOT NULL,
	[ReplyID] [int] NULL,
	[remarkUrl] [nchar](200) NOT NULL,
	[remarkPath] [nchar](200) NOT NULL,
	[up] [int] NOT NULL,
	[down] [int] NOT NULL)

GO

